<%--
  Created by IntelliJ IDEA.
  User: owner
  Date: 2018-08-04
  Time: 23:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@include file="../../include/back/BackHeader.jsp"%>
<%@include file="../../include/back/BackNavigator.jsp"%>
<title>编辑产品图片</title>

<div class="Back_productImageadd">
    <ol class="breadcrumb">
        <li><a href="admin_category_list">所有分类</a></li>
        <li><a href="admin_product_list?cid=${product.category.id}">${product.category.name}</a></li>
        <li class="active">${product.name}</li>
        <li class="active">编辑图片</li>
    </ol>
    <div  class="Back_productImage">
        <div class="Back_productImageSingle">
            <div class="panel panel-default">
                <div class="panel-heading">新增产品 <span>单个</span> 图片</div>
                <div class="panel-body">
                    请选择本地图片 尺寸400X400 为佳
                    <form action="admin_productImage_add" method="post" enctype="multipart/form-data" id="productImage_form1">
                        <input type="file" accept="image/*" name="file" id="Image_file1">
                        <input type="hidden" name="pid" value="${product.id}">
                        <input type="hidden" name="type" value="type_single">
                        <button class="btn btn-success" type="submit" >提交</button>
                    </form>
                </div>
            </div>
            <div class="productImageSingle">
                <table class="table table-bordered table-hover table-striped table-condensed productImageSingle-table">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>产品单个图片缩略图</th>
                        <th>删除</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${images1}" var="img" varStatus="st">
                        <tr>
                            <td>${img.id}</td>
                            <td><a href="img/productSingle/${img.id}.jpg"><img height="40px" width="40px" src="img/productSingle/${img.id}.jpg"></a></td>
                            <td><a href="admin_productImage_delete?piid=${img.id}" deleteLink="true"><span class="glyphicon glyphicon-trash"></span></a></td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="Back_productImageDetail">
            <div class="panel panel-default">
                <div class="panel-heading">新增产品 <span>详情</span> 图片</div>
                <div class="panel-body">
                    请选择本地图片 宽度790 为佳
                    <form action="admin_productImage_add" method="post" enctype="multipart/form-data" id="productImage_form2">
                        <input type="file" accept="image/*" name="file" id="Image_file2">
                        <input type="hidden" name="pid" value="${product.id}">
                        <input type="hidden" name="type" value="type_detail">
                        <button class="btn btn-success" type="submit">提交</button>
                    </form>
                </div>
            </div>
            <div class="productImageDetail">
                <table class="table table-bordered table-hover table-striped table-condensed productImageDetail-table">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>产品详情图片缩略图</th>
                        <th>删除</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${images2}" var="img" varStatus="st">
                        <tr>
                            <td>${img.id}</td>
                            <td><a href="img/productDetail/${img.id}.jpg"><img height="40px" width="40px" src="img/productDetail/${img.id}.jpg"></a></td>
                            <td><a href="admin_productImage_delete?piid=${img.id}" deleteLink="true"><span class="glyphicon glyphicon-trash"></span></a></td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
<%@include file="../../include/back/BackFooter.jsp"%>
